import request from '@/utils/request'

// 查询交易条款列表
export function listTransactionTerms(dealId) {
  return request({
    url: '/transactionTerms/transactionTerms/list',
    method: 'get',
    params: { 'dealId': dealId }
  })
}

// 保存交易条款
export function saveTransactionTerms(data) {
  return request({
    url: '/transactionTerms/transactionTerms/save',
    method: 'post',
    data: data
  })
}

// 查询交易条款详细
export function getTransactionTerms(id) {
  return request({
    url: '/transactionTerms/transactionTerms/' + id,
    method: 'get'
  })
}

// 删除交易条款
export function delTransactionTerms(id) {
  return request({
    url: '/transactionTerms/transactionTerms/' + id,
    method: 'delete'
  })
}

// 导出交易条款
export function exportTransactionTerms(query) {
  return request({
    url: '/transactionTerms/transactionTerms/export',
    method: 'get',
    params: query
  })
}

// 初始化交易条款
export function init(dealId) {
  return request({
    url: '/transactionTerms/transactionTerms/init/' + dealId,
    method: 'get'
  })
}
